package br.com.projeto.dao.jdbc;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;


public class ConnectionFactory {	
	private Connection connection;
	public Connection getConnection(){
		try{
			connection = DriverManager.getConnection("jdbc:mysql://localhost/sakila", "root", "");
			return connection;
		} catch (SQLException exception){
			System.err.println("Erro JDBC ao criar conexao" + exception);
			throw new RuntimeException(exception);
		}
	}
}
